#include "simulation.h"
//! je calcule la pression a partir de la densite 
void sim_compute_pressure( Simulation *sim )
{
    CHECK_SIM(sim);
    field_set_pressure(sim->P,
                       sim->eq,
                       sim->rho,
                       sim->T );
    
    
}

//! je calcule la viscosite en fonction de la densite
void sim_compute_viscosity(Simulation *sim)
{
	CHECK_SIM(sim);
	field_set_viscosity(sim->eta1,
						sim->visco, 
						sim->rho,
						sim->T);
	
	field_set_second_viscosity(sim->zeta1,
							   sim->second_visco,
							   sim->rho,
							   sim->T);
}

//! je calcule le gradient de la pression 
void sim_compute_gradP( Simulation *sim )
{
    CHECK_SIM(sim);
    field_gradient(sim->gradPx,
                   sim->gradPy,
                   sim->P,
                   sim->inv_dx,
                   sim->inv_dy);
}
